<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 
        // let arr = ['appple', 'banana', 'orange', 'tomato', undefined]
        // let newArr = arr.map((val) => {
        //     return val + '新'
        // });
        // console.log(newArr);
    </script>

    <script>
        let arr = [{
            title: 'aaaa',
            read: 100,
            hot: true
        }, {
            title: 'bbbb',
            read: 100,
            hot: true
        }, {
            title: 'cccc',
            read: 100,
            hot: true
        }, {
            title: 'dddd',
            read: 100,
            hot: true
        }];

        let newArr = arr.map((val) => {
            return val.title
        });

        // console.log(newArr);
    </script>


    <script>
        let arr1 = [{
            title: 'aaaa',
            read: 100,
            hot: true
        }, {
            title: 'bbbb',
            read: 100,
            hot: true
        }, {
            title: 'cccc',
            read: 100,
            hot: true
        }, {
            title: 'dddd',
            read: 100,
            hot: true
        }];

        let newArr1 = arr1.map((item, index, arr) => {
            let json = {};
            json.t = `-_- ${item.title}`;
            json.r = item.read + 500;
            json.h = !item.hot
            return json
        });
        console.log(newArr1);
    </script>
</body>

</html>